Skip to content

Move V2 azure-identity to azure-core#48949

Draft
srnagar wants to merge 3 commits intoAzure:mainfrom
srnagar:core-identity-merge
Draft

Move V2 azure-identity to azure-core#48949
srnagar wants to merge 3 commits intoAzure:mainfrom
srnagar:core-identity-merge

Conversation

@srnagar
Copy link
Copy Markdown
Member

@srnagar srnagar commented Apr 27, 2026

This pull request primarily migrates the azure-identity v2 credential classes into the azure-core v2 package, consolidating identity-related functionality under com.azure.v2.core.identity. It also removes the separate identity-v2 module, updates dependencies, and adjusts references throughout the codebase to reflect the new package structure. Additionally, several new dependencies and build configurations are introduced to support the refactored code.

Key changes:

Identity Package Consolidation and Refactoring

  • Migrated all classes from com.azure.v2.identity to com.azure.v2.core.identity, including credential builders and implementations, and updated all imports and references accordingly. This includes renaming and moving files such as AuthorizationCodeCredential, AzureCliCredential, AzureDeveloperCliCredential, and their respective builders. [1] [2] [3] [4] [5] [6] [7]
  • Removed the sdk/identity-v2 module from the main project structure (pom.xml), effectively consolidating all v2 identity functionality under azure-core.

Dependency and Build Configuration Updates

  • Added new dependencies to azure-core for msal4j, msal4j-persistence-extension, and testing libraries such as mockito-inline and byte-buddy. Also introduced the maven-enforcer-plugin to ban specific dependency versions as needed. [1] [2]
  • Updated appconfiguration-v2 and versioning files to remove direct dependencies on azure-identity v2 and to use the new core.identity package for credentials in both source and test code. [1] [2] [3] [4] [5]

Checkstyle and Linting Adjustments

  • Added new suppressions in azure-core's checkstyle configuration for identity-related implementation classes, reflecting the new package structure and to accommodate specific code patterns.

These changes collectively streamline the identity experience in the v2 SDK by centralizing identity management, improving maintainability, and preparing for future enhancements.

@github-actions github-actions Bot added the Azure.Core.V2 Contains issues to consider when desiging Azure Core V2 label Apr 27, 2026
Comment on lines +11 to +13
requires msal4j.persistence.extension;
requires com.sun.jna;
requires com.sun.jna.platform;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should determine the credentials needing this and split them out into a separate package as we don't want these dependencies in Core.

[azure_ca]: https://learn.microsoft.com/azure/security/fundamentals/azure-ca-details?tabs=root-and-subordinate-cas-list#client-compatibility-for-public-pkis
[azure_cli]: https://learn.microsoft.com/cli/azure
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core-v2/azure-core
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to think about how we link to Identity stuff now that it's in Core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Core.V2 Contains issues to consider when desiging Azure Core V2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants